import React from 'react'
import { Card, Button, message } from 'antd'
import './ui.less'

export default class Messages extends React.Component {
  showMessage = (type)=> {
    message[type]("恭喜您，成功晋级到青铜五。")
  }
  render() {
    return (
      <div>
        <Card title="通知提醒框" className="card-wrap">
          <Button type="primary" onClick={()=>this.showMessage('success')}>Success</Button>
          <Button type="primary" onClick={()=>this.showMessage('info')}>Info</Button>
          <Button type="primary" onClick={()=>this.showMessage('warning')}>Warning</Button>
          <Button type="primary" onClick={()=>this.showMessage('error')}>Error</Button>
          <Button type="primary" onClick={()=>this.showMessage('loading')}>loading</Button>
        </Card>
      </div>
    )
  }
}